package com.main.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import com.main.dao.PersonDAO;
import com.main.service.JdbcPersonServiceImpl;
import com.main.service.PersonService;
import com.main.service.JpaPersonServiceImpl;

@Configuration
@ComponentScan("com.main")
public class AppConfig {

	@Bean
	public PersonDAO personDao() {
		return new PersonDAO();
	}
	
	@Bean(name="jpaPersonService")
	public PersonService jpaPersonService() {
		return new JpaPersonServiceImpl();
	}
	
	@Bean(name="jdbcPersonService")
	public PersonService jdbcPersonService() {
		return new JdbcPersonServiceImpl();
	}
}
